<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:ResourceBlender_Express"
    xmlns:converters="clr-namespace:ResourceBlender_Express.Converters">

    <DataTemplate DataType="{x:Type loc:RBApplication}">
        <TextBlock Text="{Binding DisplayName}" />
    </DataTemplate>
    
    <!--DataTemplate DataType="{x:Type loc:RBTemplate}">
        <TextBlock Text="{Binding Name}" />
    </DataTemplate-->
    
    <DataTemplate x:Key="BundleTemplate">
        <DataTemplate.Resources>
            <converters:ActionToImage x:Key="ActionToImage" />
        </DataTemplate.Resources>
        <StackPanel Orientation="Horizontal">
            <Image Source="{Binding Converter={StaticResource ActionToImage}}" />
            <TextBlock Text="{Binding Value.Name}"/>
        </StackPanel>
    </DataTemplate>
    
    <DataTemplate x:Key="DictionaryList">
        <TextBlock Text="{Binding Value}" />
    </DataTemplate>
    
    <DataTemplate x:Key="LanguageListItem">
        <DataTemplate.Resources>
            <converters:CultureInfoToFlagConverter x:Key="CultureInfoToFlagConverter" />
        </DataTemplate.Resources>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
            <Image Source="{Binding Value,Converter={StaticResource CultureInfoToFlagConverter}}" Margin="0,0,6,0" Height="11" />
            <TextBlock Text="{Binding Value.EnglishName}" />
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="HeaderTemplateDesc">
        <DockPanel>
            <TextBlock HorizontalAlignment="Center" Text="{Binding}" />
            <Path x:Name="arrow" StrokeThickness="1" Fill="DarkGray" Data="M 5,10 L 15,10 L 10,5" />
        </DockPanel>
    </DataTemplate>

    <DataTemplate x:Key="HeaderTemplateAsc">
        <DockPanel>
            <TextBlock HorizontalAlignment="Center" Text="{Binding}"/>
            <Path x:Name="arrow" StrokeThickness="1" Fill="DarkGray" Data="M 5,5 L 10,10 L 15,5" />
        </DockPanel>
    </DataTemplate>
    
    <DataTemplate x:Key="CheckBoxCell">
        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
            <CheckBox IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}},Path=IsSelected}" />
        </StackPanel>
    </DataTemplate>

</ResourceDictionary>